1. Field of the Invention
This invention relates to a method for setting a moving position of at least one of a workpiece and a tool in a machine tool to machine the workpiece into a desired shape by moving at least one of the workpiece and the tool with the workpiece rotated around a predetermined axis.
2. Background Art
An apparatus for controlling the moving position of at least one of a workpiece and a tool is disclosed in Japanese Patent Laid-Open No. 296109/1991. The driving control apparatus for a machine tool disclosed in Japanese Patent Laid-Open No. 296109/1991 is arranged so as to electronically perform the driving control of the machine tool which was mechanically performed by cams in the conventional art. The driving control apparatus disclosed in the publication includes a pulse encoder attached to a rotatable member, a rotation position storage means which reads a pulse signal from the pulse encoder and stores ever-changing rotation position data, and a command position storage means which stores command position data representing a moving position on a moving axis set for every unit rotational position of the rotatable member. Ever-changing moving command data on the moving axis is generated from the rotation position data and the command position data. Further, command speed data of the moving axis in synchronous with the rotation speed of the rotatable member is generated from the moving command data and the rotation position data. Then, the position of the tool is controlled by the moving command data and the command speed data thus generated.
However, in the driving control apparatus as disclosed in Japanese Patent Laid-Open No. 296109/1991, it is required to store, in a memory such as a RAM etc. as the command position storage means, the command position data (moving positions) on the moving axis set for every unit rotation position of the rotatable member, that is, enormous position data relating to a desired machining shape. Thus, the storage capacity of the memory becomes too large. Further, in order to improve the machining accuracy of the workpiece, it is required to finely set the unit rotation positions to further increase the number of the position data, which results in the large increase of the storage capacity.
Accordingly, the invention has been made in view of the aforesaid problems of the conventional technique, and an object of the invention is to provide a method for setting a moving position in a machine tool, which can improve the machining accuracy of a workpiece by a tool without increasing a storage capacity for position data.
According to the invention, a method for setting a moving position of at least one of a workpiece and a tool in a machine tool for machining the workpiece rotated around a predetermined axis into a desired shape by the tool, comprises the steps of:
dividing a contour shape of the desired shape at section along the predetermined axis into a plurality of machining units, each including a plurality of inflection points including a machining unit start point and a machining unit end point;
setting machining data including at least machining speed data for each of the machining units;
calculating an arrival time to each of the inflection points based on the machining speed data;
calculating a position of at least one of the workpiece and the tool at each of the inflection points; and
setting a rotation angle position of the workpiece corresponding to the arrival time as an accumulated count value for each of the machining units.
In this manner, the contour shape of the workpiece is divided into a plurality of the machining units based on the contour shape of the finished workpiece, and the moving position of at least one of the workpiece and the tool is determined for each of the machining units. Thus, the position of at least one of the workpiece and the tool thus set is suitable for the actual machining operation and so the position data etc. can be set easily without error. In particular, since the contour shape is divided into the machining units by the inflection points of the contour shape, the positions can be inputted accurately by a small amount of the position data.
Further, since the moving positions of at least one of the workpiece and the tool for each of the machining units are set for the accumulation value of the rotation angle position of the workpiece, the position data at the both ends of the machining unit does not change at the time of the calculation due to re-division, insertion or addition of the machining unit. Any error to be accumulated by such calculation does not influence on the position data of other machining units. Further, at the time of the actual machining, since a moving command for controlling the movements of the workpiece and the tools is outputted based on the moving positions (position data) thus calculated, there does not occur cumulative error to the dimensions of the machined workpiece. As a result, accurate machining by the machine tool can be realized.
The method for setting positions according to the invention may further comprise the step of adding a cutting stock to the machining unit to obtain a new machining start point and a new machining end point.
The machining unit start point or the machining unit end point is extended with the addition of a cutting stock to obtain a new machining unit start point or a new machining unit end point. The cutting stock is an area which is finally cut off or an area in which the tool is moved as if the machining is performed. With the addition of a cutting stock to an actual machining area, the movement of the workpiece is made continuous under the same machining condition around the machining start portion and the machining end portion. Thus, the machining is stably performed with good accuracy. Further, the setting of such a cutting stock can be performed easily.
The method for setting positions according to the invention may further comprise the step of storing the position of one of the workpiece and the tool corresponding to the rotation angle position of the workpiece.
When configured in this manner, the calculated position of at least one of the workpiece and the tool is stored as the position data in correspondence with the rotation angle position of the workpiece. Thus, the positions can be suitably stored as the position data.